<BODY COLOR=black BACKGROUND=..\gfx/backdrop.jpg BGPROPERTIES=FIXED><FONT FACE=Verdana SIZE=2><FONT SIZE=3><B>
SC_sphereCast

</B></FONT><BR>
<br>


SYNTAX<BR>

    return integer=SC_sphereCast ( objNum, oldx, oldy, oldz, x, y, z, radius, excludeObj )

<BR><BR>

        <u>-objNum</u>:       the object you want to check for collision use 0 for all objects<br>
        <u>-oldx...z</u>:     the start and end points of the sphere to check.<br>
        <u>-radius</u>:       the radius of the sphere you want to cast.<br>
        <u>-excludeObj</u>:   an object to exclude from the collision check.<br>
        <u>returns</u>:       if objNum=0 then the object number collided with is returned<br>
                              if checking a specific object then a 1 is returned if a collision occured.<br>
                              returns 0 if no collision occured.<br>
   						<br>
        Will check if the ray starting at oldx#,oldy#,oldz# and ending at<br>
        x#,y#,z#, and of width radius#, collides with the specified object (obj=0 for all).<br>
        does not collide with backfaces, will return the number of the object<br>
        hit first, or 0 for no collision.<br><br>

        Sphere casting commands add a width dimension to normal ray casting which can be used<br>
        to check if a player has hit anything during movement and to position them at the collision<br>
        point to provide 'sticky' collision, where the player stops if they hit anything. The<br>
        alternative is sliding collision. see <a href="sc_sphereSlide.htm">SC_sphereSlide</a><br><br>

        The collision point returned (which can be retrieved using SC_getStaticCollision()) is<br>
        the point where the sphere is during collision, not the actual point of collision between<br>
        sphere and object.

        A slide point is also returned by this command (use SC_getCollisionSlide()) but should<br>
        not be used for true sliding collision as SC_sphereCast only does one iteration of checks<br>
        see <a href="sc_sphereSlide.htm">SC_sphereSlide</a><br><br> for detailed sliding collision.

<BR><BR>
RELATED INFO<BR>
<a href="..\Collision.htm">Collision Commands Menu<BR>
</a><a href="..\..\index.htm">Index</a><BR>
<BR>
<BR>
</FONT></BODY>